#!/bin/bash



criar_pot(){

intltool-extract --type="gettext/glade" pixmaps/painel-zaitan.glade
mv pixmaps/painel-zaitan.glade.h po/
cp data/usr/lib/zaitan/*.py po/
#cp /data/usr/lib/zaitan/modulo/*.rmod data/usr/share/locale/

cd po/

if [ -e messages.pot ]; then
mv messages.pot messages.pot.old
fi

xgettext -k_ -kN_ -o messages.pot *.h

rm -f *.rmod *.py *.h

}


gerar_po(){

cd po/
LOCALE='es pt_BR pt_PT'
for locale in $LOCALE ; do
msginit -i messages.pot -l "$locale"
done

}


update(){

cd po/
msgmerge --update editado.po messages.pot -o novo.po

}


criar_mo(){

cd po/
LOCALE='es pt_BR pt_PT'
for locale in $LOCALE ; do
msgfmt $locale.po -o $locale/LC_MESSAGES/zaitan.mo
done


}
